#include <bits/stdc++.h>

using namespace std;
#define int long long
const int inf = 0x3f3f3f3f;

void solve()
{
	int n, m, k;
	cin >> n >> m >> k;
	vector<vector<char>> grid(n, vector<char>(m));
	for (int i = 0; i < n; i++) for (int j = 0; j < m; j++) cin >> grid[i][j];
	int ans = 0;

	for (int i = 0; i < n; i++)
	{
		int cnt = 0;
		for (int j = 0; j < m; j++)
		{
			if (grid[i][j] == '*')
			{
				ans += k <= cnt ? cnt - k + 1 : 0;
				cnt = 0;
			}
			else cnt++;
		}
		ans += k <= cnt ? cnt - k + 1 : 0;
	}
	if (k != 1)
	{
		for (int i = 0; i < m; i++)
		{
			int cnt = 0;
			for (int j = 0; j < n; j++)
			{
				if (grid[j][i] == '*')
				{
					ans += k <= cnt ? cnt - k + 1 : 0;
					cnt = 0;
				}
				else cnt++;
			}
			ans += k <= cnt ? cnt - k + 1 : 0;
		}
	}

	cout << ans;
}

signed main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int _ = 1;
	//cin >> _;
	while (_--)
	{
		solve();
	}
	return 0;
}